﻿@{
    ViewBag.Title = "加工单列表";
    Layout = "~/Views/Shared/_LayoutList.cshtml"; 
}
@(       
 Html.DWZGridFor<Resto.CostControl.Core.MaterialProcess>()
    .Title("加工单列表")
    .Action(@Url.Action("Index"))
    .Columns(col =>
    {
        col.Bind(e => e.Id).IsKey();
        //col.Bind(e => e.Code).Width(80).AsQuery().Align(FlexiGridAlign.Left);
        col.Bind(e => e.ProcessDate).Width(70).DateFormat("yyyy-MM-dd");
        col.Bind(e => e.Category).EnumKey("MaterialCategory").Width(50);
        //col.Bind(e => e.TotalWeight).Width(80).Align(FlexiGridAlign.Right);
        col.Bind(e => e.OrderState).Width(40).EnumKey("ProcessState");
        col.Bind(e => e.ItemDesc).Width("auto").Align(FlexiGridAlign.Left);
        col.Bind(e => e.UpdateUser).Width(60);
        col.Bind(e => e.UpdateDate).Width(70).DateFormat("yyyy-MM-dd");
        col.Bind(e => e.Id, "操作", 120).Sortable(false)
            .Template(Url.EditLinkTwo(Url.Action("Edit"), "编辑加工单")
            + Url.DeleteLink("Delete", "${ProcessDate}"));
    })
    .Buttons(btn =>
    {
        btn.Bind("Add", "新建加工单", FlexiGridButtonType.Add).Action(@Url.Action("Edit")).OnPress("AddNewTwo");
    })
)